//需求：键盘录入五个整数，储存到数组中，并对数组求和
package edu.zut.process;
import java.util.Scanner;
public class Array_5 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int[] arr = new int[5];
        for (int i = 0;i<arr.length;i++){
            System.out.println("请输入第"+(i+1)+"个整数：");
            arr[i] = sc.nextInt();
        }
        for (int i = 0;i<arr.length;i++){
            sum += arr[i];
        }
        System.out.println("sum"+ sum);
    }
}
